<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>PHP 数据对象</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-tables.html">odbc_tables</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.pdo.html">简介</a></div>
 <div class="up"><a href="refs.database.abstract.html">数据库抽象层</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="book.pdo" class="book">
 
 <h1 class="title">PHP 数据对象</h1>
 
 
 
 
 
 
 









 









 







 

 









 









 









 










 





 



 





 



 





 




 






 






<ul class="chunklist chunklist_book"><li><a href="intro.pdo.html">简介</a></li><li><a href="pdo.setup.html">安装／配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="pdo.requirements.html">需求</a></li><li><a href="pdo.installation.html">安装</a></li><li><a href="pdo.configuration.html">运行时配置</a></li><li><a href="pdo.resources.html">资源类型</a></li></ul></li><li><a href="pdo.constants.html">预定义常量</a></li><li><a href="pdo.connections.html">连接与连接管理</a></li><li><a href="pdo.transactions.html">事务与自动提交</a></li><li><a href="pdo.prepared-statements.html">预处理语句与存储过程</a></li><li><a href="pdo.error-handling.html">错误与错误处理</a></li><li><a href="pdo.lobs.html">大对象 (LOBs)</a></li><li><a href="class.pdo.html">PDO</a> — PDO 类<ul class="chunklist chunklist_book chunklist_children"><li><a href="pdo.begintransaction.html">PDO::beginTransaction</a> — 启动一个事务</li><li><a href="pdo.commit.html">PDO::commit</a> — 提交一个事务</li><li><a href="pdo.construct.html">PDO::__construct</a> — 创建一个表示数据库连接的 PDO 实例</li><li><a href="pdo.errorcode.html">PDO::errorCode</a> — 获取跟数据库句柄上一次操作相关的 SQLSTATE</li><li><a href="pdo.errorinfo.html">PDO::errorInfo</a> — Fetch extended error information associated with the last operation on the database handle</li><li><a href="pdo.exec.html">PDO::exec</a> — 执行一条 SQL 语句，并返回受影响的行数</li><li><a href="pdo.getattribute.html">PDO::getAttribute</a> — 取回一个数据库连接的属性</li><li><a href="pdo.getavailabledrivers.html">PDO::getAvailableDrivers</a> — 返回一个可用驱动的数组</li><li><a href="pdo.intransaction.html">PDO::inTransaction</a> — 检查是否在一个事务内</li><li><a href="pdo.lastinsertid.html">PDO::lastInsertId</a> — 返回最后插入行的ID或序列值</li><li><a href="pdo.prepare.html">PDO::prepare</a> — Prepares a statement for execution and returns a statement object</li><li><a href="pdo.query.html">PDO::query</a> — Executes an SQL statement, returning a result set as a PDOStatement object</li><li><a href="pdo.quote.html">PDO::quote</a> — Quotes a string for use in a query.</li><li><a href="pdo.rollback.html">PDO::rollBack</a> — 回滚一个事务</li><li><a href="pdo.setattribute.html">PDO::setAttribute</a> — 设置属性</li></ul></li><li><a href="class.pdostatement.html">PDOStatement</a> — PDOStatement 类<ul class="chunklist chunklist_book chunklist_children"><li><a href="pdostatement.bindcolumn.html">PDOStatement::bindColumn</a> — 绑定一列到一个 PHP 变量</li><li><a href="pdostatement.bindparam.html">PDOStatement::bindParam</a> — 绑定一个参数到指定的变量名</li><li><a href="pdostatement.bindvalue.html">PDOStatement::bindValue</a> — 把一个值绑定到一个参数</li><li><a href="pdostatement.closecursor.html">PDOStatement::closeCursor</a> — 关闭游标，使语句能再次被执行。</li><li><a href="pdostatement.columncount.html">PDOStatement::columnCount</a> — 返回结果集中的列数</li><li><a href="pdostatement.debugdumpparams.html">PDOStatement::debugDumpParams</a> — 打印一条 SQL 预处理命令</li><li><a href="pdostatement.errorcode.html">PDOStatement::errorCode</a> — 获取跟上一次语句句柄操作相关的 SQLSTATE</li><li><a href="pdostatement.errorinfo.html">PDOStatement::errorInfo</a> — 获取跟上一次语句句柄操作相关的扩展错误信息</li><li><a href="pdostatement.execute.html">PDOStatement::execute</a> — 执行一条预处理语句</li><li><a href="pdostatement.fetch.html">PDOStatement::fetch</a> — 从结果集中获取下一行</li><li><a href="pdostatement.fetchall.html">PDOStatement::fetchAll</a> — 返回一个包含结果集中所有行的数组</li><li><a href="pdostatement.fetchcolumn.html">PDOStatement::fetchColumn</a> — 从结果集中的下一行返回单独的一列。</li><li><a href="pdostatement.fetchobject.html">PDOStatement::fetchObject</a> — 获取下一行并作为一个对象返回。</li><li><a href="pdostatement.getattribute.html">PDOStatement::getAttribute</a> — 检索一个语句属性</li><li><a href="pdostatement.getcolumnmeta.html">PDOStatement::getColumnMeta</a> — 返回结果集中一列的元数据</li><li><a href="pdostatement.nextrowset.html">PDOStatement::nextRowset</a> — 在一个多行集语句句柄中推进到下一个行集</li><li><a href="pdostatement.rowcount.html">PDOStatement::rowCount</a> — 返回受上一个 SQL 语句影响的行数</li><li><a href="pdostatement.setattribute.html">PDOStatement::setAttribute</a> — 设置一个语句属性</li><li><a href="pdostatement.setfetchmode.html">PDOStatement::setFetchMode</a> — 为语句设置默认的获取模式。</li></ul></li><li><a href="class.pdoexception.html">PDOException</a> — PDOException 异常类</li><li><a href="pdo.drivers.html">PDO 驱动</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="ref.pdo-cubrid.html">CUBRID (PDO)</a> — CUBRID Functions (PDO_CUBRID)</li><li><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a> — Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</li><li><a href="ref.pdo-firebird.html">Firebird (PDO)</a> — Firebird Functions (PDO_FIREBIRD)</li><li><a href="ref.pdo-ibm.html">IBM (PDO)</a> — IBM Functions (PDO_IBM)</li><li><a href="ref.pdo-informix.html">Informix (PDO)</a> — Informix Functions (PDO_INFORMIX)</li><li><a href="ref.pdo-mysql.html">MySQL (PDO)</a> — MySQL Functions (PDO_MYSQL)</li><li><a href="ref.pdo-sqlsrv.html">MS SQL Server (PDO)</a> — Microsoft SQL Server Functions (PDO_SQLSRV)</li><li><a href="ref.pdo-oci.html">Oracle (PDO)</a> — Oracle Functions (PDO_OCI)</li><li><a href="ref.pdo-odbc.html">ODBC and DB2 (PDO)</a> — ODBC and DB2 Functions (PDO_ODBC)</li><li><a href="ref.pdo-pgsql.html">PostgreSQL (PDO)</a> — PostgreSQL Functions (PDO_PGSQL)</li><li><a href="ref.pdo-sqlite.html">SQLite (PDO)</a> — SQLite Functions (PDO_SQLITE)</li><li><a href="ref.pdo-4d.html">4D (PDO)</a> — 4D Functions (PDO_4D)</li></ul></li></ul></div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-tables.html">odbc_tables</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.pdo.html">简介</a></div>
 <div class="up"><a href="refs.database.abstract.html">数据库抽象层</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
